#ifndef SEQUENTIAL_STACK_H
#define SEQUENTIAL_STACK_H

#include <stdbool.h>

#define MAX_STACK_LENGTH    100
#define MAX_TITLE_LENGTH        128
#define MAX_TIMESTAMP_LENGTH    30
#define MAX_URL_LENGTH          128

typedef struct {
    char title[MAX_TITLE_LENGTH];
    char timestamp[MAX_TIMESTAMP_LENGTH];
    char url[MAX_URL_LENGTH];
} BrowserData_t;

typedef struct {
    BrowserData_t browserData[MAX_STACK_LENGTH];
    int top; // 栈顶标志
} SeqStack_t;

typedef enum {
    SEQ_STACK_SUCCESS,
    SEQ_STACK_FAIL,
}SeqSackStatus_t;

void SeqStackInit(SeqStack_t *stack);
bool SeqStackIsEmpty(const SeqStack_t *stack);
bool SeqStackIsFull(const SeqStack_t *stack);
SeqSackStatus_t SeqStackPush(SeqStack_t *stack, const BrowserData_t *data);
SeqSackStatus_t SeqStackPop(SeqStack_t *stack, BrowserData_t *data);
SeqSackStatus_t SeqStackGetTop(SeqStack_t *stack, BrowserData_t *data);

#endif
